
# ------------------------------------------------------------------------------
# Replication Materials
# 
# title: Eliciting Beliefs as Distributions in Online Surveys
# journal: Political Analysis
# authors: Lucas Leemann, Richard Traunmüller, and Lukas Stoetzer
# date: August 2020
# ------------------------------------------------------------------------------





### Abstract #######################################################################

## Citizens’ beliefs about uncertain events are fundamental variables in many areas of 
## political science. While beliefs are often conceptualized in the form of distributions, 
## obtaining reliable measures in terms of full prob- ability densities is a difficult 
## task. In this letter, we ask if there is an effective way of eliciting beliefs as 
## distributions in the context of online surveys. Relying on experimental evidence, we 
## evaluate the performance of five different elicitation methods designed to capture 
## citizens’ uncertain expectations. Our results suggest that an elicitation method 
## originally proposed by Manski (2009) performs well. It measures average citizens’ 
## subjective belief distributions reliably and is easily implemented in the context of 
## regular (online) surveys. We expect that a wider use of this method will lead to 
## considerable improvements in the study of citizens’ expectations and beliefs.



### Content #######################################################################

# Code to replicate all results in the original manuscript. 

# The file "00_a_RUN THIS FILE.R" will call all other files in the correct order and
# all results are written into the sub-directory "out/fig".

# The sub-directory "fun" contains two files with customized functions needed for the analysis.

# The sub-directory "in" contains all survey data.
  

### Technical Details ###############################################################

# Analysis can be run on a single core.

# Code was run on R version 4.0.2 (2020-06-22) -- "Taking Off Again".

# Library versions
# tidyverse 1.3.0
# xtable    1.8-4
# ggplot2   3.3.2     
# purrr     0.3.4
# tibble    3.0.3     
# dplyr     1.0.2
# tidyr     1.1.1  
# stringr   1.4.0
# readr     1.3.1
# forcats   0.5.0

# Machine: MacBook Pro, 3.5 GHz dual core i7, 16 GB, OS Catalina (10.15.6).

# Runtime 
#> end.time - start.time
# Time difference of 2.270041 mins



